<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Calico: calico::BatchOptimizer Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Calico
   </div>
   <div id="projectbrief">A visual-inertial calibration library designed for rapid problem construction and debugging.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespacecalico.html">calico</a></li><li class="navelem"><a class="el" href="classcalico_1_1BatchOptimizer.html">BatchOptimizer</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classcalico_1_1BatchOptimizer-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">calico::BatchOptimizer Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="batch__optimizer_8h_source.html">batch_optimizer.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:adcc0fc997ccf70eb8c75b86664b0c1dc"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcalico_1_1BatchOptimizer.html#adcc0fc997ccf70eb8c75b86664b0c1dc">AddSensor</a> (<a class="el" href="classcalico_1_1sensors_1_1Sensor.html">sensors::Sensor</a> *sensor, bool take_ownership=true)</td></tr>
<tr class="separator:adcc0fc997ccf70eb8c75b86664b0c1dc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6c02770812da1c8ad94fe59706051327"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcalico_1_1BatchOptimizer.html#a6c02770812da1c8ad94fe59706051327">AddWorldModel</a> (<a class="el" href="classcalico_1_1WorldModel.html">WorldModel</a> *world_model, bool take_ownership=true)</td></tr>
<tr class="separator:a6c02770812da1c8ad94fe59706051327"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a183868df8b8f0ac1321d03332b0efbdc"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcalico_1_1BatchOptimizer.html#a183868df8b8f0ac1321d03332b0efbdc">AddTrajectory</a> (<a class="el" href="classcalico_1_1Trajectory.html">Trajectory</a> *trajectory_world_sensorrig, bool take_ownership=true)</td></tr>
<tr class="separator:a183868df8b8f0ac1321d03332b0efbdc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3ab9c0411514b4d6a02b0cca674d052b"><td class="memItemLeft" align="right" valign="top">absl::StatusOr&lt; ceres::Solver::Summary &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcalico_1_1BatchOptimizer.html#a3ab9c0411514b4d6a02b0cca674d052b">Optimize</a> (const ceres::Solver::Options &amp;options=<a class="el" href="namespacecalico.html#aaa1f3edabbaf4a92827f5340a76e37b6">DefaultSolverOptions</a>())</td></tr>
<tr class="separator:a3ab9c0411514b4d6a02b0cca674d052b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Batch optimizer class. Takes <code>Sensor</code>, <code><a class="el" href="classcalico_1_1WorldModel.html">WorldModel</a></code>, and <code><a class="el" href="classcalico_1_1Trajectory.html">Trajectory</a></code> objects and adds their parameters to a least-squares optimization problem. Sensor classes also contribute residuals which are functions of <code><a class="el" href="classcalico_1_1WorldModel.html">WorldModel</a></code> and <code><a class="el" href="classcalico_1_1Trajectory.html">Trajectory</a></code>. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="adcc0fc997ccf70eb8c75b86664b0c1dc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adcc0fc997ccf70eb8c75b86664b0c1dc">&#9670;&nbsp;</a></span>AddSensor()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void calico::BatchOptimizer::AddSensor </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classcalico_1_1sensors_1_1Sensor.html">sensors::Sensor</a> *&#160;</td>
          <td class="paramname"><em>sensor</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>take_ownership</em> = <code>true</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Add a sensor to the optimizer. <code>sensor</code> is a raw pointer, and by default, <code><a class="el" href="classcalico_1_1BatchOptimizer.html">BatchOptimizer</a></code> will take ownership of that pointer, so there is no need to de-allocate once <a class="el" href="classcalico_1_1BatchOptimizer.html">BatchOptimizer</a> goes out of scope.<br  />
<br  />
<b>NOTE: If this pointer is owned by a smart pointer or must persist out of the <a class="el" href="classcalico_1_1BatchOptimizer.html">BatchOptimizer</a> scope, pass in <code>take_ownership=false</code>.</b> </p>

</div>
</div>
<a id="a183868df8b8f0ac1321d03332b0efbdc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a183868df8b8f0ac1321d03332b0efbdc">&#9670;&nbsp;</a></span>AddTrajectory()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void calico::BatchOptimizer::AddTrajectory </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classcalico_1_1Trajectory.html">Trajectory</a> *&#160;</td>
          <td class="paramname"><em>trajectory_world_sensorrig</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>take_ownership</em> = <code>true</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Add a <a class="el" href="classcalico_1_1Trajectory.html">Trajectory</a> to the optimizer. <code>trajectory_world_sensorrig</code> is a raw pointer, and by default, <code><a class="el" href="classcalico_1_1BatchOptimizer.html">BatchOptimizer</a></code> will take ownership of that pointer, so there is no need to de-allocate once <a class="el" href="classcalico_1_1BatchOptimizer.html">BatchOptimizer</a> goes out of scope.<br  />
<br  />
<b>NOTE: If this pointer is owned by a smart pointer or must persist out of the <a class="el" href="classcalico_1_1BatchOptimizer.html">BatchOptimizer</a> scope, pass in <code>take_ownership=false</code>.</b><br  />
<br  />
<code>trajectory_world_sensorrig</code> is the time-parameterized pose of the sensor rig w.r.t. the world origin resolved in the world frame </p><p class="formulaDsp">
\[ \mathbf{T}^w_r(t) = \left[\begin{matrix}\mathbf{R}^w_r &amp; \mathbf{t}^w_{wr} \\\mathbf{0}&amp;1\end{matrix}\right] \]
</p>
<p>. </p>

</div>
</div>
<a id="a6c02770812da1c8ad94fe59706051327"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6c02770812da1c8ad94fe59706051327">&#9670;&nbsp;</a></span>AddWorldModel()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void calico::BatchOptimizer::AddWorldModel </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classcalico_1_1WorldModel.html">WorldModel</a> *&#160;</td>
          <td class="paramname"><em>world_model</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>take_ownership</em> = <code>true</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Add a <a class="el" href="classcalico_1_1WorldModel.html">WorldModel</a> to the optimizer. <code>world_model</code> is a raw pointer, and by default, <code><a class="el" href="classcalico_1_1BatchOptimizer.html">BatchOptimizer</a></code> will take ownership of that pointer, so there is no need to de-allocate once <a class="el" href="classcalico_1_1BatchOptimizer.html">BatchOptimizer</a> goes out of scope.<br  />
<br  />
<b>NOTE: If this pointer is owned by a smart pointer or must persist out of the <a class="el" href="classcalico_1_1BatchOptimizer.html">BatchOptimizer</a> scope, pass in <code>take_ownership=false</code>.</b> </p>

</div>
</div>
<a id="a3ab9c0411514b4d6a02b0cca674d052b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3ab9c0411514b4d6a02b0cca674d052b">&#9670;&nbsp;</a></span>Optimize()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">absl::StatusOr&lt; ceres::Solver::Summary &gt; calico::BatchOptimizer::Optimize </td>
          <td>(</td>
          <td class="paramtype">const ceres::Solver::Options &amp;&#160;</td>
          <td class="paramname"><em>options</em> = <code><a class="el" href="namespacecalico.html#aaa1f3edabbaf4a92827f5340a76e37b6">DefaultSolverOptions</a>()</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Run the optimization with solver options. By default, <code>options</code> is <code><a class="el" href="namespacecalico.html#aaa1f3edabbaf4a92827f5340a76e37b6" title="Default solver options.">DefaultSolverOptions()</a></code>.<br  />
<br  />
<code>options</code> is an unmodified <a href="http://ceres-solver.org/nnls_solving.html#solver-options"><code>ceres::Solver::Options</code> object</a>. Click the link to see all configurable options. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>calico/<a class="el" href="batch__optimizer_8h_source.html">batch_optimizer.h</a></li>
<li>calico/batch_optimizer.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1
</small></address>
</body>
</html>
